package org.dromara.test

import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.DisplayName
import org.junit.jupiter.api.Test

/**
 * 断言单元测试案例
 *
 * @author LikeYouDo
 */
@DisplayName("断言单元测试案例")
class AssertUnitTest {
    
    @DisplayName("测试 assertEquals 方法")
    @Test
    fun testAssertEquals() {
        Assertions.assertEquals("666", "666")
        Assertions.assertNotEquals("666", "666")
    }

    @DisplayName("测试 assertSame 方法")
    @Test
    fun testAssertSame() {
        val obj = Any()
        val obj1 = obj
        Assertions.assertSame(obj, obj1)
        Assertions.assertNotSame(obj, obj1)
    }

    @DisplayName("测试 assertTrue 方法")
    @Test
    fun testAssertTrue() {
        Assertions.assertTrue(true)
        Assertions.assertFalse(true)
    }

    @DisplayName("测试 assertNull 方法")
    @Test
    fun testAssertNull() {
        Assertions.assertNull(null)
        Assertions.assertNotNull(null)
    }

}
